using System;
using System.Collections.Specialized;

namespace ELS.Configuration
{
	#region ConfigurationValueCollection
	/// <summary>
	/// Represents a collection of string values associated with a property.
	/// </summary>
	public class ConfigurationValueCollection : StringCollection
	{
		#region constructors
		/// <summary>
		/// Initializes a new instance of the <see cref="ELS.Configuration.ConfigurationValueCollection"/> class.
		/// </summary>
		public ConfigurationValueCollection()
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ELS.Configuration.ConfigurationValueCollection"/> class.
		/// </summary>
		/// <param name="values">an array of string values.</param>
		public ConfigurationValueCollection(string[] values)
		{
			this.AddRange( values );
		}

		#endregion constructors

		#region public functions
		/// <summary>
		/// Copies the elements of the ConfigurationValueCollection to a string array.
		/// </summary>
		/// <returns></returns>
		public string[] ToArray()
		{
			string[] array = new string [ this.Count ];
			this.CopyTo( array , 0 );
			return array;
		}
		#endregion public functions

	}

	#endregion ConfigurationValueCollection
}
